package com.Lyy.Service;

import com.Lyy.Dao.StudentMapper;
import com.Lyy.Entity.Student;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;
@Component
public class StudentServiceImpl implements StudentService {
    @Autowired
    private StudentMapper studentMapper;
    @Override
    public List<Student> SelectStudentAll() {
        return studentMapper.SelectStudentAll();
    }

    @Override
    public Student SelectStudentById(int id) {
        return studentMapper.SelectStudentById(id);
    }

    @Override
    public List<Student> SelectStudentByName(String studentName) {
        return studentMapper.SelectStudentByName(studentName);
    }

    @Override
    public int UpdateStudent(Student student) {
        return studentMapper.UpdateStudent(student);
    }

    @Override
    public int DeleteStudentById(int studentId) {
        return studentMapper.DeleteStudentById(studentId);
    }

    @Override
    public int InsertStudent(Student student) {
        return studentMapper.InsertStudent(student);
    }
}
